<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--

/*
 * Copyright (C) 2018 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
-->

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

    <!-- jQuery -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

    <!-- mainJS + MD5 -->
    <script src="js/main.js"></script>
    <style>
      .top-bottom-buffer {
        margin-top:10px;
        margin-bottom:10px;
      }

      html, body{
        height:100%
      }

      #map {
        height: 100%;
        width: 100%;
      }
    </style>

    <title>IoT Nirvana</title>
  </head>

  <body>
    <!-- Google Maps -->
    <div id="map" style="display:none"></div>

    <!-- Google Map -->
    <script async defer src="https://maps.googleapis.com/maps/api/js?key=[MAPS_API_KEY]&callback=initMap"></script>

    <!-- Create all the cities -->
    <script>
      var xhr = new XMLHttpRequest();
      xhr.open("GET", "/rest/city/saveCities", true);
      xhr.onload = function (e) {
        if (xhr.readyState === 4) {
          if (xhr.status === 200) {
            console.log(xhr.responseText);
          } else {
            console.error(xhr.statusText);
          }
        }
      };
      xhr.onerror = function (e) {
        console.error(xhr.statusText);
      };
      xhr.send(null);
    </script>

  </body>
</html>
